package com.foreknow.elmboot.service.Impl;

import com.foreknow.elmboot.mapper.BusinessMapper;
import com.foreknow.elmboot.po.Business;
import com.foreknow.elmboot.service.BusinessService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 啊滨
 * @date 2023/2/13 16:37
 */
@Service//标记当前类是一个service类，加上该注解会将当前类自动注入到spring容器中
public class BusinessServiceImpl implements BusinessService {
    @Autowired//依赖注入 调用dao中的方法 IOC容器进行初始化
    private BusinessMapper businessMapper;

    @Override
    public List<Business> listBusinessByOrderTypeId(int orderTypeId) {

        return businessMapper.listBusinessByOrderTypeId(orderTypeId);
    }

    @Override
    public Business getBusinessById(int businessId) {

        return businessMapper.getBusinessById(businessId);
    }
}
